package cn.hniu.service.Impl;

import cn.hniu.mapper.TextPostsMapper;
import cn.hniu.pojo.TextPosts;
import cn.hniu.pojo.Topics;
import cn.hniu.service.TextPostsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TextPostsServiceImpl implements TextPostsService {

    @Autowired
    private TextPostsMapper textPostsMapper;

    @Override
    public List<TextPosts> findTextPosts(String data, Integer begin, Integer size) {
        return textPostsMapper.findTextPosts(data,begin,size);
    }

    @Override
    public Integer updateTextPosts(TextPosts textPosts) {
        return textPostsMapper.updateById(textPosts);
    }

    @Override
    public Integer deleteTextPosts(Integer id) {
        return textPostsMapper.deleteById(id);
    }

    @Override
    public List<TextPosts> findTextPostsByflowrate() {
        return textPostsMapper.findTextPostsByflowrate();
    }
}
